<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\imp\dmp\bi\service;

class TaskReportModel {
	
	static $_TSPEC;
	public $report_date = null;
	public $task_id = null;
	public $period = null;
	public $brand_uv = null;
	public $search_uv = null;
	public $detail_uv = null;
	public $addcart_uv = null;
	public $like_uv = null;
	public $book_goods_actureamt = null;
	public $book_buyer_cnt = null;
	public $goods_actureamt = null;
	public $buyer_cnt = null;
	public $new_buyer_cnt_180d = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'report_date'
			),
			2 => array(
			'var' => 'task_id'
			),
			3 => array(
			'var' => 'period'
			),
			4 => array(
			'var' => 'brand_uv'
			),
			5 => array(
			'var' => 'search_uv'
			),
			6 => array(
			'var' => 'detail_uv'
			),
			7 => array(
			'var' => 'addcart_uv'
			),
			8 => array(
			'var' => 'like_uv'
			),
			9 => array(
			'var' => 'book_goods_actureamt'
			),
			10 => array(
			'var' => 'book_buyer_cnt'
			),
			11 => array(
			'var' => 'goods_actureamt'
			),
			12 => array(
			'var' => 'buyer_cnt'
			),
			13 => array(
			'var' => 'new_buyer_cnt_180d'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['report_date'])){
				
				$this->report_date = $vals['report_date'];
			}
			
			
			if (isset($vals['task_id'])){
				
				$this->task_id = $vals['task_id'];
			}
			
			
			if (isset($vals['period'])){
				
				$this->period = $vals['period'];
			}
			
			
			if (isset($vals['brand_uv'])){
				
				$this->brand_uv = $vals['brand_uv'];
			}
			
			
			if (isset($vals['search_uv'])){
				
				$this->search_uv = $vals['search_uv'];
			}
			
			
			if (isset($vals['detail_uv'])){
				
				$this->detail_uv = $vals['detail_uv'];
			}
			
			
			if (isset($vals['addcart_uv'])){
				
				$this->addcart_uv = $vals['addcart_uv'];
			}
			
			
			if (isset($vals['like_uv'])){
				
				$this->like_uv = $vals['like_uv'];
			}
			
			
			if (isset($vals['book_goods_actureamt'])){
				
				$this->book_goods_actureamt = $vals['book_goods_actureamt'];
			}
			
			
			if (isset($vals['book_buyer_cnt'])){
				
				$this->book_buyer_cnt = $vals['book_buyer_cnt'];
			}
			
			
			if (isset($vals['goods_actureamt'])){
				
				$this->goods_actureamt = $vals['goods_actureamt'];
			}
			
			
			if (isset($vals['buyer_cnt'])){
				
				$this->buyer_cnt = $vals['buyer_cnt'];
			}
			
			
			if (isset($vals['new_buyer_cnt_180d'])){
				
				$this->new_buyer_cnt_180d = $vals['new_buyer_cnt_180d'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'TaskReportModel';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("report_date" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->report_date);
				
			}
			
			
			
			
			if ("task_id" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->task_id);
				
			}
			
			
			
			
			if ("period" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->period);
				
			}
			
			
			
			
			if ("brand_uv" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->brand_uv); 
				
			}
			
			
			
			
			if ("search_uv" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->search_uv); 
				
			}
			
			
			
			
			if ("detail_uv" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->detail_uv); 
				
			}
			
			
			
			
			if ("addcart_uv" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->addcart_uv); 
				
			}
			
			
			
			
			if ("like_uv" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->like_uv); 
				
			}
			
			
			
			
			if ("book_goods_actureamt" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->book_goods_actureamt); 
				
			}
			
			
			
			
			if ("book_buyer_cnt" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->book_buyer_cnt); 
				
			}
			
			
			
			
			if ("goods_actureamt" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->goods_actureamt); 
				
			}
			
			
			
			
			if ("buyer_cnt" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->buyer_cnt); 
				
			}
			
			
			
			
			if ("new_buyer_cnt_180d" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->new_buyer_cnt_180d); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		$xfer += $output->writeFieldBegin('report_date');
		$xfer += $output->writeString($this->report_date);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('task_id');
		$xfer += $output->writeString($this->task_id);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('period');
		$xfer += $output->writeString($this->period);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('brand_uv');
		$xfer += $output->writeI64($this->brand_uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('search_uv');
		$xfer += $output->writeI64($this->search_uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('detail_uv');
		$xfer += $output->writeI64($this->detail_uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('addcart_uv');
		$xfer += $output->writeI64($this->addcart_uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('like_uv');
		$xfer += $output->writeI64($this->like_uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('book_goods_actureamt');
		$xfer += $output->writeI64($this->book_goods_actureamt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('book_buyer_cnt');
		$xfer += $output->writeI64($this->book_buyer_cnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('goods_actureamt');
		$xfer += $output->writeI64($this->goods_actureamt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('buyer_cnt');
		$xfer += $output->writeI64($this->buyer_cnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('new_buyer_cnt_180d');
		$xfer += $output->writeI64($this->new_buyer_cnt_180d);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>